package com.accedo.achievements.services.ajax;

import net.sf.json.JSONObject;

public interface BadgeService {
	/**
	 * Get all badges in three state categories : finished, playing and none.
	 * <p>the sequence is grouped by the newest badge to the front.
	 * <p>finished state means this user already unlocked all achievements and obtained the badge.<br>
	 * playing state means this user has partly unlocked the achievements.<br>
	 * none state means this user has never unlocked any achievements related to the badge.
	 * @param username	user name
	 * @return			JSON badges<br>
	 * eg. {badges:[{badge_sn:'Badge009', badge_name:'HONG KONG', state:'playing'},
	 * {badge_sn:'Badge008', badge_name:'SHANGHAI', state:'none'}]}
	 */
	public JSONObject getJsonBadgesByUsername(String username);
	
	/**
	 * Get all badges in three state categories : finished, playing and none.
	 * <p>the sequence is grouped by finished badge, playing badge and then none badge.
	 * <p>finished state means this user already unlocked all achievements and obtained the badge.<br>
	 * playing state means this user has partly unlocked the achievements.<br>
	 * none state means this user has never unlocked any achievements related to the badge.
	 * @param username	user name
	 * @return			JSON badges<br>
	 * eg. {badges:[{badge_sn:'Badge001', badge_name:'NEW YORK', state:'finished'},
	 * {badge_sn:'Badge009', badge_name:'HONG KONG', state:'playing'},
	 * {badge_sn:'Badge007', badge_name:'TORONTO', state:'none'}]}
	 */
	public JSONObject getJsonBadgesByUsernameForFriendShow(String username);
}
